package AgentTravel.LogicObjects;


import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import AgentTravel.gui.AbstractModelObject;

public class TripData extends AbstractModelObject implements Serializable
{
	private static final long serialVersionUID = -8998023852312086491L;

	private Date startDate;
	private List<City> citiesToVisit = new ArrayList<City>();
	
	public TripData()
	{
		
	}

	/**
	 * @param startDate the startDate to set
	 */
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	/**
	 * @return the startDate
	 */
	public Date getStartDate() {
		return startDate;
	}
	
	public void addCity(City c)
	{
		List<City> oldValue = citiesToVisit;
		citiesToVisit = new ArrayList<City>(citiesToVisit);
		citiesToVisit.add(c);
		firePropertyChange("citiesToVisit", oldValue, citiesToVisit);
	}

	/**
	 * @return the citiesToVisit
	 */
	public List<City> getCitiesToVisit() {
		return citiesToVisit;
	}
}
